#pragma once
#include "stdafx.h"

class Component;

class CameraClass :
	public Component
{
public:
	typedef boost::shared_ptr<CameraClass> sPtr;

	CameraClass(void);
	~CameraClass(void);

	void AddedToObject();

	void SetPosition(float, float, float);

	const XMMATRIX& GetViewMatrix();
	const XMMATRIX& GetPerspectiveMatrix();
	const XMMATRIX& GetOrthoMatrix();

private:
	void _update();
	void MoveUp(const Message&);
	void MoveDown(const Message&);
	void MoveLeft(const Message&);
	void MoveRight(const Message&);
	void MoveIn(const Message&);
	void MoveOut(const Message&);
	void RoundRight(const Message&);
	void RoundLeft(const Message&);
	void Initial(const Message&);
	void GetViewMatrix(const Message&);
	void GetPerspectiveMatrix(const Message&);


	XMVECTOR m_position;
	XMVECTOR m_target;
	XMVECTOR m_up;

	XMMATRIX m_ViewMatrix;
	XMMATRIX m_PerspectiveMatrix;
	XMMATRIX m_OrthoMatrix;

	float m_AspectRadio;
	float m_NearPlane;
	float m_FarPlane;

	int m_screenWidth;
	int m_screenHeight;

};

